package com.example.xiaozhi;

import android.content.Context;
import android.graphics.drawable.Drawable;

public class AirCon {
    public static final int COLD=1;
    public static final int HOT=2;
    public static final int WIND=3;
    public static final int KONGT=4;
    public static final int ICE=5;
    public static final int HWATER=6;

    private String brand;
    private Integer temp;
    private Integer mode;
    private int ivmode;
    private Context mContext;
    public AirCon(Context context){

        mContext=context;
    }

    public String getBrand() {

        return brand;
    }

    public void setBrand(String brand) {

        this.brand = brand;
    }

    public Integer getTemp() {

        return temp;
    }

    public void setTemp(Integer temp) {

        this.temp = temp;
    }

    public Integer getMode() {

        return mode;
    }

    public void setMode(Integer mode) {

        this.mode = mode;
    }
    public void setMode1(Integer ivmode) {

        this.ivmode = ivmode;
    }
    public Drawable getModeImage(){
        switch (mode){
            case COLD:
                return mContext.getDrawable(R.mipmap.cold);
            case HOT:
                return mContext.getDrawable(R.mipmap.sun);
            case WIND:
                return mContext.getDrawable(R.mipmap.wind);
            default:
                return mContext.getDrawable(R.mipmap.wind);
        }
    }
    public Drawable getModeImage1(){
        switch (ivmode){
            case KONGT:
                return mContext.getDrawable(R.mipmap.kong);
            case ICE:
                return mContext.getDrawable(R.mipmap.kongtiao);
            case HWATER:
                return mContext.getDrawable(R.mipmap.geli);
            default:
                return mContext.getDrawable(R.mipmap.kong);
        }
    }
    public String getModeText(){
        switch (mode){
            case COLD:
                return "制冷";
            case HOT:
                return "制热";
            case WIND:
                return"风速";
            default:
                return "制冷";
        }
    }
}
